﻿var IFRAMEPOPUP = 'IFR_ESF_IFRAMEPOPUP';
var DIVTOOLTIPID = 'DIV_ESF_WEB_DIVTOOLTIP';
var DIVLOADINGMESSAGEID = 'div_ESF_WEB_DIVLOADINGMESSAGE';
var DIVCOVERID = 'div_ESF_WEB_DIVCOVER';

var LOADINGIMGURL = mainURL + '/CommonFiles/Images/Loading_220x19.gif';


IsNull = function (object) {
	return (typeof (object) == 'undefined' || object == null);
}


if (IsNull(document.getElementById(IFRAMEPOPUP))) {
	document.write(
		'<iframe id="' + IFRAMEPOPUP + '" style="display:none;z-index: 11000;" frameborder="0" marginheight="0" marginwidth="0" scrolling="auto"></iframe>');
}


if (IsNull(document.getElementById(DIVTOOLTIPID))) {
	document.write(
		'<div id="' + DIVTOOLTIPID + '" style="display:none;z-index: 11000;"></div>');
}


if (IsNull(document.getElementById(DIVCOVERID))) {
	document.write(
		'<div id="' + DIVCOVERID + '" style="display:none;background-color:#111; filter: alpha(opacity = 65); opacity: 0.65; position:fixed; z-index: 11000; top:0px; left:0px; width:100%;height:100%;"></div>');
}


if (IsNull(document.getElementById(DIVLOADINGMESSAGEID))) {
	document.write(
		'<div id="' + DIVLOADINGMESSAGEID + '_Container" style="background-color:#111; filter: alpha(opacity = 65); opacity: 0.65; position:fixed; z-index: 13000; top:0px; left:0px; width:100%;height:100%;"></div>');

	document.write(
		'<div id="' + DIVLOADINGMESSAGEID + '" ' +
			'style="position:fixed;width:244px;' +
				'background:white;border: solid 1px #b2b2b2;padding: 10px;color:Black;z-index: 13001;">' +
			'<div class="text" style="font-family:Arial, Helvetica;display:block; float:left;vertical-align:middle;"><div style="text-align:center;width:100%;font-size:12px;">Procesando su solicitud.<br/>Espere un momento...</div>' +
			'<div class=\'image\' style="display:block; float:left;width:220px;height:19px;margin-top:10px;vertical-align:middle;"><img src="' + LOADINGIMGURL + '" /></div>' +
			'</div></div>');
}